package com.fiberhome.ztelauncher.xml.bean;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;

import java.io.Serializable;
import java.util.List;

/**
 * Created by Deed on 2018/3/19.
 */
@XStreamAlias("LauncherData")
public class LaunchDataPage implements Serializable{
    @XStreamAsAttribute
    public String id;
    @XStreamAsAttribute
    public String version;
    @XStreamAlias("Elements")
    public Elements elements;

    public static class Elements {
        @XStreamImplicit(itemFieldName = "Element")
        public List<Element> elements;

    }
    public static class Element {
        @XStreamAsAttribute
        public String id;
        @XStreamAsAttribute
        public String type;
        @XStreamAsAttribute
        public boolean canfocus;
        @XStreamAsAttribute
        public boolean defaultfocus;
        @XStreamAsAttribute
        public int autoswitchtime;
        @XStreamAsAttribute
        public int transition;
        @XStreamAsAttribute
        public boolean auto;
        @XStreamAsAttribute
        public String link;

        @XStreamAlias("ElementDatas")
        public ElementDatas elementDatas;
    }

    public static class ElementDatas {
        @XStreamImplicit(itemFieldName = "ElementData")
        public List<ElementData> elementDatas;
    }

    public static class ElementData {
        @XStreamAsAttribute
        public String order;
        @XStreamAlias("ElementName")
        public String elementName;
        @XStreamAlias("ElementDesc")
        public String elementDesc;
        @XStreamAlias("ElementStatisticDesc")
        public String elementStatisticDesc;
        @XStreamAlias("ContentURL")
        public String contentURL;
        @XStreamAlias("BackGroundContentURL")
        public String backGroundContentURL;
        @XStreamAlias("FocusContentURL")
        public String focusContentURL;
        @XStreamAlias("ScriptContentURL")
        public String scriptContentURL;
        @XStreamAlias("AdPlaceId")
        public String adPlaceId;
        @XStreamAlias("AdServerURL")
        public String adServerURL;
        @XStreamAlias("ElementAction")
        public ElementAction elementAction;
        @XStreamAlias("ExtraData")
        public ExtraData extraData;
    }
}
